package ua.edu.sumdu.j2se.roman.lab1.view.swing;

import ua.edu.sumdu.j2se.roman.lab1.controller.Controller;
import ua.edu.sumdu.j2se.roman.lab1.domain.Task;
import ua.edu.sumdu.j2se.roman.lab1.view.PostponeCommandView;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;

/**
 * Author: Radko Roman.
 */

/**
 * Creates interface for postpone task on some time.
 *
 */
public class SwingPostponeCommandView implements PostponeCommandView{
    /**
     * Creates for make feedback with controller.
     *
     */
    private Controller controller;
    /**
     * Creates for read from the console date of the next alert.
     *
     */
    private Scanner scanner;
    /**
     * Creates for set format of the receiving date.
     *
     */
    private DateFormat format = new SimpleDateFormat(DATE_PATTERN);
    /**
     * Task that should be shown to user.
     *
     */
    private Task informTask;
    /**
     * Contains date format.
     *
     */
    public static final String DATE_PATTERN = "dd.MM.yy h:mm:ss";

    public SwingPostponeCommandView(Controller controller) {
        this(new Scanner(System.in), controller);
    }

    public SwingPostponeCommandView(Scanner scanner, Controller controller) {
        this.scanner = scanner;
        this.controller = controller;
    }

    /**
     * Shows on some swing component message about postpone task.
     *
     * @param task
     */
    @Override
    public void show(Task task) {

    }

    @Override
    public Date getNextDateOfPostponeTaskNotification() {
        return null;
    }
}
